package lab02.Test05;

public class Box {
    /**
     * Created by Administrator on 2017/10/13.
     */
    public static void main(String[] args) {

    }
    public class Cube {
        //1.属性
        private double width;
        private double height;
        private double length;
        //2.方法
        public void setWidth(double width ){
            this.width = width;
        }
        public double getWidth(){
            return width;
        }
        public void setHeight(double height){
            this.height=height;
        }
        public double getHeight(){
            return height;
        }
        public void setLength(double length){
            this.length= length;
        }
        public double getLength(){
            return length;
        }
        public double capacity(double length,double width,double height){
            double capacity;
            capacity = length*width*height;
            return capacity;
        }
        //3.构造函数
        Cube(){
            System.out.print("立方体体积是");
        }
    }


}
